home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / J-M / Knob Demo Stack.cpt / Knob Demo Stack / card_11382.txt < prev    next >
Text File  |  1989-04-13  |  6KB  |  277 lines

  1. -- card: 11382 from stack: in
  2. -- bmap block id: 8293
  3. -- flags: 0000
  4. -- background id: 10567
  5. -- name: CDU
  6.  
  7.  
  8. -- part 1 (button)
  9. -- low flags: 00
  10. -- high flags: 8000
  11. -- rect: left=466 top=4 right=44 bottom=502
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 1011 / 1011
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Home
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   visual effect zoom in
  23.   go home
  24. end mouseUp
  25.  
  26.  
  27.  
  28. -- part 2 (button)
  29. -- low flags: 00
  30. -- high flags: 0000
  31. -- rect: left=279 top=35 right=108 bottom=352
  32. -- title width / last selected line: 0
  33. -- icon id / first selected line: 0 / 0
  34. -- text alignment: 1
  35. -- font id: 0
  36. -- text size: 12
  37. -- style flags: 0
  38. -- line height: 16
  39. -- part name: KnobA
  40. ----- HyperTalk script -----
  41. on mouseUp
  42.   global KnobPositionA
  43.  
  44.   if the shiftKey is down then
  45.     -- Rotate the knob counter clockwise.
  46.     if KnobPositionA > 1 then
  47.       subtract 1 from KnobPositionA
  48.     else
  49.       -- We can't rotate beyond the four positions.
  50.       beep
  51.       exit mouseUp
  52.     end if
  53.   else
  54.     -- Rotate the knob clockwise.
  55.     if KnobPositionA < 4 then
  56.       add 1 to KnobPositionA
  57.     else
  58.       -- We can't rotate beyond the four positions.
  59.       beep
  60.       exit mouseUp
  61.     end if
  62.   end if
  63.  
  64.   lock screen
  65.   -- Erase the original knob.
  66.   choose select tool
  67.   drag from 276,35 to 355,115
  68.   doMenu "Clear Picture"
  69.  
  70.   push card
  71.   go to card Knobs
  72.   choose lasso tool
  73.   -- The following code requires that the position of the knob
  74.   -- graphics on the "Knob" card be exactly aligned.  DO NOT CHANGE !!
  75.  
  76.   -- When you click with the Command Key you get the whole object.
  77.   -- Thank goodness !!!
  78.   put ((KnobPositionA - 1) * 115) + 53 into H
  79.   click at H,68 with CommandKey
  80.  
  81.   doMenu "Copy Picture"
  82.   pop card
  83.   doMenu "Paste Picture"
  84.   drag from H,68 to 314,45
  85.   choose browse tool
  86.   unlock screen
  87. end mouseUp
  88.  
  89.  
  90.  
  91.  
  92. -- part 7 (field)
  93. -- low flags: 81
  94. -- high flags: 0004
  95. -- rect: left=66 top=121 right=207 bottom=233
  96. -- title width / last selected line: 0
  97. -- icon id / first selected line: 0 / 0
  98. -- text alignment: 0
  99. -- font id: 3
  100. -- text size: 12
  101. -- style flags: 256
  102. -- line height: 16
  103. -- part name: Knob Info
  104.  
  105.  
  106. -- part 8 (button)
  107. -- low flags: 00
  108. -- high flags: 0000
  109. -- rect: left=437 top=75 right=148 bottom=510
  110. -- title width / last selected line: 0
  111. -- icon id / first selected line: 0 / 0
  112. -- text alignment: 1
  113. -- font id: 0
  114. -- text size: 12
  115. -- style flags: 0
  116. -- line height: 16
  117. -- part name: Knob Help
  118. ----- HyperTalk script -----
  119. on mouseUp
  120.   -- playVW "SE1:Data:VideoWorks:Art:Clip Animation:Arrows:LU Arrow" -- ,vwnoclear,vwlocation,265,150
  121.   set visible of card field "Knob Info" to true
  122.   wait for 3 seconds
  123.   set visible of card field "Knob Info" to false
  124. end mouseUp
  125.  
  126.  
  127.  
  128. -- part 9 (button)
  129. -- low flags: 00
  130. -- high flags: 2000
  131. -- rect: left=309 top=126 right=156 bottom=341
  132. -- title width / last selected line: 0
  133. -- icon id / first selected line: 0 / 0
  134. -- text alignment: 1
  135. -- font id: 0
  136. -- text size: 12
  137. -- style flags: 0
  138. -- line height: 16
  139. -- part name: Brightness
  140. ----- HyperTalk script -----
  141. on mouseUp
  142.   set visible of card field "BRT Test" to true
  143.   wait for 2 seconds
  144.   choose select tool
  145.   drag from 105,41 to 274,162
  146.   repeat for 30 times
  147.     doMenu "Darken"
  148.   end repeat
  149.   repeat for 40 times
  150.     doMenu "Lighten"
  151.   end repeat
  152.   doMenu "Clear Picture"
  153.   wait for 1 second
  154.   set visible of card field "BRT Test" to false
  155.   choose browse tool
  156. end mouseUp
  157.  
  158.  
  159.  
  160. -- part 11 (field)
  161. -- low flags: 81
  162. -- high flags: 0000
  163. -- rect: left=103 top=56 right=158 bottom=281
  164. -- title width / last selected line: 0
  165. -- icon id / first selected line: 0 / 0
  166. -- text alignment: 0
  167. -- font id: 3
  168. -- text size: 12
  169. -- style flags: 0
  170. -- line height: 16
  171. -- part name: BRT Test
  172.  
  173.  
  174. -- part 12 (button)
  175. -- low flags: 00
  176. -- high flags: 0000
  177. -- rect: left=96 top=210 right=283 bottom=169
  178. -- title width / last selected line: 0
  179. -- icon id / first selected line: 0 / 0
  180. -- text alignment: 1
  181. -- font id: 0
  182. -- text size: 12
  183. -- style flags: 0
  184. -- line height: 16
  185. -- part name: KnobB
  186. ----- HyperTalk script -----
  187. on mouseUp
  188.   global KnobPositionB
  189.  
  190.   if the shiftKey is down then
  191.     -- Rotate the knob counter clockwise.
  192.     if KnobPositionB > 1 then
  193.       subtract 1 from KnobPositionB
  194.     else
  195.       -- We can't rotate beyond the four positions.
  196.       beep
  197.       exit mouseUp
  198.     end if
  199.   else
  200.     -- Rotate the knob clockwise.
  201.     if KnobPositionB < 10 then
  202.       add 1 to KnobPositionB
  203.     else
  204.       -- We can't rotate beyond the four positions.
  205.       beep
  206.       exit mouseUp
  207.     end if
  208.   end if
  209.  
  210.   lock screen
  211.   -- Erase the original knob.
  212.   choose select tool
  213.   drag from 95,209 to 170,283
  214.   doMenu "Clear Picture"
  215.  
  216.   push card
  217.   go to card Knobs
  218.   choose lasso tool
  219.   -- The following code requires that the position of the knob
  220.   -- graphics on the "Knob" card be exactly aligned.  DO NOT CHANGE !!
  221.  
  222.   -- When you click with the Command Key you get the whole object.
  223.   -- Thank goodness !!!
  224.   -- Remember, there's two rows of these buttons !!
  225.   if KnobPositionB < 6 then
  226.     put ((KnobPositionB - 1) * 100) + 53 into H
  227.     click at H,183 with CommandKey
  228.   else
  229.     put ((KnobPositionB - 6) * 100) + 53 into H
  230.     click at H,272 with CommandKey
  231.   end if
  232.   doMenu "Copy Picture"
  233.   pop card
  234.   doMenu "Paste Picture"
  235.   -- Remember, there's two rows of these buttons !!
  236.   if KnobPositionB < 6 then
  237.     drag from H,183 to 131,217
  238.   else
  239.     drag from H,272 to 131,217
  240.   end if
  241.   choose browse tool
  242.   unlock screen
  243. end mouseUp
  244.  
  245.  
  246.  
  247.  
  248. -- part 13 (field)
  249. -- low flags: 80
  250. -- high flags: 0004
  251. -- rect: left=63 top=126 right=217 bottom=311
  252. -- title width / last selected line: 0
  253. -- icon id / first selected line: 0 / 0
  254. -- text alignment: 0
  255. -- font id: 3
  256. -- text size: 14
  257. -- style flags: 256
  258. -- line height: 18
  259. -- part name: Wait
  260.  
  261.  
  262. -- part contents for card part 7
  263. ----- text -----
  264. Click on the knob to rotate clockwise.
  265.  
  266. Shift-Click to rotate counter clockwise.
  267.  
  268. -- part contents for card part 11
  269. ----- text -----
  270. The BRT control changes the brightness of the display.
  271.  
  272. This is just an illustration of that feature.
  273.  
  274. -- part contents for card part 13
  275. ----- text -----
  276.  
  277. Pardon me while I clean up the two knobs to position 1.